<template>
	<view class="bg-white" >
		<cu-custom :bgColor="NavBarColor" :isBack="true" backFlag="navigate">
			<block slot="backText">返回</block>
			<block slot="content">小时用气量报表详情</block>
		</cu-custom>
		<view class="cu-list menu margin-top">





			<view class="cu-item animation-slide-bottom" :style="[{animationDelay: '0.2s'}]">
				<view class="content">
					<text class="text-black title ">用户名称:</text>
				</view>
				<view class="action">
					<text class="text-black title ">{{annotation.userName}}</text>
				</view>
			</view>

			<view class="cu-item animation-slide-bottom" :style="[{animationDelay: '0.2s'}]">
				<view class="content">
					<text class="text-black title ">采集点名称:</text>
				</view>
				<view class="action">
					<text class="text-black title ">{{annotation.dpName}}</text>
				</view>
			</view>

			<view class="cu-item animation-slide-bottom" :style="[{animationDelay: '0.2s'}]">
				<view class="content">
					<text class="text-black title ">采集点编号:</text>
				</view>
				<view class="action">
					<text class="text-black title ">{{annotation.dpid}}</text>
				</view>
			</view>

			<view class="cu-item animation-slide-bottom" :style="[{animationDelay: '0.2s'}]">
				<view class="content">
					<text class="text-black title ">设备编号:</text>
				</view>
				<view class="action">
					<text class="text-black title ">{{annotation.dtuid}}</text>
				</view>
			</view>

			<view class="cu-item animation-slide-bottom" :style="[{animationDelay: '0.2s'}]">
				<view class="content">
					<text class="text-black title ">上次时间:</text>
				</view>
				<view class="action">
					<text class="text-black title ">{{annotation.lastTime}}</text>
				</view>
			</view>

			<view class="cu-item animation-slide-bottom" :style="[{animationDelay: '0.2s'}]">
				<view class="content">
					<text class="text-black title ">本次时间:</text>
				</view>
				<view class="action">
					<text class="text-black title ">{{annotation.thisTime}}</text>
				</view>
			</view>

			<view class="cu-item animation-slide-bottom" :style="[{animationDelay: '0.2s'}]">
				<view class="content">
					<text class="text-black title ">压力:</text>
				</view>
				<view class="action">
					<text class="text-black title ">{{annotation.yaLi}}</text>
				</view>
			</view>

			<view class="cu-item animation-slide-bottom" :style="[{animationDelay: '0.2s'}]">
				<view class="content">
					<text class="text-black title ">温度:</text>
				</view>
				<view class="action">
					<text class="text-black title ">{{annotation.wenDu}}</text>
				</view>
			</view>

			<view class="cu-item animation-slide-bottom" :style="[{animationDelay: '0.2s'}]">
				<view class="content">
					<text class="text-black title ">本次累计量:</text>
				</view>
				<view class="action">
					<text class="text-black title ">{{annotation.thisSum}}</text>
				</view>
			</view>

			<view class="cu-item animation-slide-bottom" :style="[{animationDelay: '0.2s'}]">
				<view class="content">
					<text class="text-black title ">标况流量:</text>
				</view>
				<view class="action">
					<text class="text-black title ">{{annotation.liuLiang}}</text>
				</view>
			</view>

			<view class="cu-item animation-slide-bottom" :style="[{animationDelay: '0.2s'}]">
				<view class="content">
					<text class="text-black title ">小时用气量:</text>
				</view>
				<view class="action">
					<text class="text-black title ">{{annotation.useSum}}</text>
				</view>
			</view>

			<view class="cu-item animation-slide-bottom" :style="[{animationDelay: '0.2s'}]">
				<view class="content">
					<text class="text-black title ">合计:</text>
				</view>
				<view class="action">
					<text class="text-black title ">{{annotation.thisSum}}</text>
				</view>
			</view>

		</view>
	</view>
</template>

<script>
	export default {
		data(){
			return{
				NavBarColor:this.NavBarColor,
				annotation:{
					id:"",
					titile:"",
					startTime:"",
					sender:"",
					msgContent:"",
					recordVideo:"",
					userId:"",
					longitude:'',
					dimension:'',
				},
				goodNumber:null,
				flg:true,
				src:"",
				pic:"",
				userId:"",
				id:"",

			}
		},
		// onLoad:function(){
		// 	console.log("this.$Route.query",this.$Route);
		// 	let query = this.$Route.query
		// 	if(query){
		// 		this.annotation = query;
		// 		}
		// },
		onLoad: function (option) {
		    const annItem = JSON.parse(decodeURIComponent(option.item));
			this.annotation = annItem
			console.log('’%%%%%%%%%%%%',this.annotation)

			this.pic=this.annotation.picture
			this.userId=this.annotation.userid
			this.id=this.annotation.id
			console.log("jjs"+this.userId)

			/* this.src=this.annotation.reportVideo
			this.pic=this.annotation.reportPic
			console.log(this.annotation.recordPic) */
		},
		created(){
			console.log("created")
			//this.readOk();
		},
		methods:{
			formatDate(text,len){
				if(!text || text.length==0){
					return ''
				}
				if(text.length<len){
					return text;
				}
				return text.substr(0,len)
			},showPic() {
			   console.log(this.pic)
					uni.navigateTo({
						url: '/pages/common/commonPic?item='+this.pic
					})
		   }
		}
	}
</script>

<style>
</style>
